package com.xiweicheng.testlog;

import ch.qos.logback.classic.pattern.ClassicConverter;
import ch.qos.logback.classic.spi.ILoggingEvent;
import org.springframework.util.StringUtils;

import java.util.UUID;

public class LogIdClassicConverter extends ClassicConverter {

    @Override
    public String convert(ILoggingEvent event) {
        String uuid = UUID.randomUUID().toString();
        return StringUtils.replace(uuid, "-", "");
    }
}
